import requests


class IhrmLoginApi:

    # 定义ihrm登录方法
    @classmethod
    def login(cls,my_json):
        resp = requests.post(url="http://ihrm-test.itheima.net/api/sys/login",
                             headers={"Content-Type": "application/json"},
                             json=my_json)

        return resp




if __name__ == '__main__':

    # 登录
    my_json = {"mobile": "13800000002", "password": "123456"}
    print(IhrmLoginApi.login(my_json).json())



